<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class AnemometerModel</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class AnemometerModel</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">class AnemometerModel</p>
<p class="description"><p>handle getting values from the conf file such as datasources  and selecting and updating queries from the query_review table</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Gavin Towey &lt;<a href="mailto:gavin@box.com">gavin@box.com</a>&gt; and Geoff Anderson &lt;geoff@box.com&gt;</li>
				<li><span class="field">license:</span> please</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_AnemometerModel.php.html">/AnemometerModel.php</a> (line <span class="field">17</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																																																				
												<div class="method-definition">
											<span class="method-result">AnemometerModel</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$conf</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#checksum_exists" title="details" class="method-name">checksum_exists</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#connect_to_datasource" title="details" class="method-name">connect_to_datasource</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#get_create_table" title="details" class="method-name">get_create_table</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#get_data_source" title="details" class="method-name">get_data_source</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#get_data_source_names" title="details" class="method-name">get_data_source_names</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#get_default_report_action" title="details" class="method-name">get_default_report_action</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#get_explain_for_sample" title="details" class="method-name">get_explain_for_sample</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$sample</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#get_form_fields" title="details" class="method-name">get_form_fields</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#get_query_advisor" title="details" class="method-name">get_query_advisor</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#get_query_by_checksum" title="details" class="method-name">get_query_by_checksum</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">MySQLi_Result</span>
										<a href="#get_query_samples" title="details" class="method-name">get_query_samples</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$limit</span> = <span class="var-default">1</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$offset</span> = <span class="var-default">0</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#get_report" title="details" class="method-name">get_report</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#get_report_defaults" title="details" class="method-name">get_report_defaults</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'report_defaults'</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#get_reviewers" title="details" class="method-name">get_reviewers</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#get_review_types" title="details" class="method-name">get_review_types</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#get_table_status" title="details" class="method-name">get_table_status</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#get_visual_explain" title="details" class="method-name">get_visual_explain</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$explain_plan</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#init_query_explainer" title="details" class="method-name">init_query_explainer</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$sample</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#set_data_source" title="details" class="method-name">set_data_source</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#set_tables" title="details" class="method-name">set_tables</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$fact</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dimension</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#update_query" title="details" class="method-name">update_query</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">30</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor.  Initialize the model object</p>
	
	<div class="method-signature">
		<span class="method-result">AnemometerModel</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$conf</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$conf</span><span class="var-description">: The global config information</span>			</li>
				</ul>
		
			
	</div>
<a name="methodchecksum_exists" id="checksum_exists"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">checksum_exists</span> (line <span class="line-number">150</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Query the database and return true if a given checksum exists</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if it exists, otherwise false</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			checksum_exists
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$checksum</span><span class="var-description">: The checksum to check</span>			</li>
				</ul>
		
			
	</div>
<a name="methodconnect_to_datasource" id="connect_to_datasource"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">connect_to_datasource</span> (line <span class="line-number">216</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Try to connect to the datasource,  throw an exception on failure</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			connect_to_datasource
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_create_table" id="get_create_table"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_create_table</span> (line <span class="line-number">318</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the create table definitions for the query</p>
	<ul class="tags">
				<li><span class="field">return:</span> The create table statements</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			get_create_table
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$query</span><span class="var-description">: the query to process</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_data_source" id="get_data_source"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_data_source</span> (line <span class="line-number">79</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Given a data source name, get the properties for it.</p>
	<ul class="tags">
				<li><span class="field">return:</span> array of properties, or null if the datasource doesn't exist</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			get_data_source
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The datasource name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_data_source_names" id="get_data_source_names"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_data_source_names</span> (line <span class="line-number">66</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the list of names for the configured data sources</p>
	<ul class="tags">
				<li><span class="field">return:</span> List of strings that describe the data sources</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			get_data_source_names
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_default_report_action" id="get_default_report_action"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_default_report_action</span> (line <span class="line-number">38</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">return the default report action name; usually either report or graph_search</p>
	<ul class="tags">
				<li><span class="field">return:</span> the action name</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			get_default_report_action
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_explain_for_sample" id="get_explain_for_sample"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_explain_for_sample</span> (line <span class="line-number">241</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">try to get the explain plan for a query</p>
	<ul class="tags">
				<li><span class="field">return:</span> Either a string with the explain plan, an error message or null</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			get_explain_for_sample
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$sample</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$sample</span><span class="var-description">: The query sample row data</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_form_fields" id="get_form_fields"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_form_fields</span> (line <span class="line-number">121</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get the field names for the given report</p>
	<ul class="tags">
				<li><span class="field">return:</span> the table alias and field names</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			get_form_fields
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The report name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_query_advisor" id="get_query_advisor"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_query_advisor</span> (line <span class="line-number">301</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">invoke pt-query-advisor and get its output</p>
	<ul class="tags">
				<li><span class="field">return:</span> The script output</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			get_query_advisor
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$query</span><span class="var-description">: The query to feed the script</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_query_by_checksum" id="get_query_by_checksum"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_query_by_checksum</span> (line <span class="line-number">190</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">given a checksum, return the full database row from the fact table for it.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The row of data, or null</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			get_query_by_checksum
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$checksum</span><span class="var-description">: The checksum to retrieve</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_query_samples" id="get_query_samples"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_query_samples</span> (line <span class="line-number">207</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Retrieve query samples from the history table, ordered from most recent</p>
	<ul class="tags">
				<li><span class="field">return:</span> The result handle</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">MySQLi_Result</span>
		<span class="method-name">
			get_query_samples
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$limit</span> = <span class="var-default">1</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$offset</span> = <span class="var-default">0</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$checksum</span><span class="var-description">: The checksum to look up</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$limit</span><span class="var-description">: The number of sample to get (default 1)</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$offset</span><span class="var-description">: The starting record number</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_report" id="get_report"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_report</span> (line <span class="line-number">131</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get the full config information for the given report.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The configuration information</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			get_report
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The report name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_report_defaults" id="get_report_defaults"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_report_defaults</span> (line <span class="line-number">48</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get the default search values for the specified report type</p>
	<ul class="tags">
				<li><span class="field">return:</span> The default values for the search form</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			get_report_defaults
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'report_defaults'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: The name of the report type</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_reviewers" id="get_reviewers"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_reviewers</span> (line <span class="line-number">140</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return a list of reviewers defined by the config file</p>
	<ul class="tags">
				<li><span class="field">return:</span> The list of reviewers</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			get_reviewers
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_review_types" id="get_review_types"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_review_types</span> (line <span class="line-number">58</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">return the list of review types.  This is a configurable list of short text  statuses that can describe the query.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the list of review status types</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			get_review_types
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_table_status" id="get_table_status"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_table_status</span> (line <span class="line-number">335</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the table status info for the given query</p>
	<ul class="tags">
				<li><span class="field">return:</span> The table status info</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			get_table_status
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$query</span><span class="var-description">: The query to process</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_visual_explain" id="get_visual_explain"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_visual_explain</span> (line <span class="line-number">284</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">invoke pt-visual-explain and get its output</p>
	<ul class="tags">
				<li><span class="field">return:</span> The visual explain output</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			get_visual_explain
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$explain_plan</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$explain_plan</span><span class="var-description">: The explain plan to feed the script</span>			</li>
				</ul>
		
			
	</div>
<a name="methodinit_query_explainer" id="init_query_explainer"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">init_query_explainer</span> (line <span class="line-number">231</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Create a new query explainer object for the given query sample</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			init_query_explainer
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$sample</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$sample</span><span class="var-description">: The qeury sample</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset_data_source" id="set_data_source"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">set_data_source</span> (line <span class="line-number">91</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">sets the currently active datasource.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			set_data_source
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the datasource</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset_tables" id="set_tables"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">set_tables</span> (line <span class="line-number">110</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">set the current fact and dimension table.  That is the query_review and  query_review_history tables.  This is used when we select samples or update  a query by its checksum.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			set_tables
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$fact</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dimension</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$fact</span><span class="var-description">: The name of the fact table</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dimension</span><span class="var-description">: The name of the dimension table</span>			</li>
				</ul>
		
			
	</div>
<a name="methodupdate_query" id="update_query"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">update_query</span> (line <span class="line-number">165</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Preform an update query on the given checksum</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			update_query
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$checksum</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$checksum</span><span class="var-description">: The checksum to update</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$fields</span><span class="var-description">: Array of Key =&gt; Value pairs to update</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 12 Mar 2012 11:50:14 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>